<div id="login_form">
    <?php
    $prefix = '';
    if($miniform) $prefix = "dialog_";
    $images=$templateUrl.'/images';
    $emailjs= 'size="30" onkeypress="if(catchEnter(event)){submitLogin(\''. $prefix .'\');}"' ;
    $passwordjs= 'size="30" onkeypress="if(catchEnter(event)){submitLogin(\''. $prefix .'\');}"' ;
    $this->load->helper('url'); 
    if(empty($this->session->userdata['is_logged_in']) || $this->session->userdata['is_logged_in']==false){
    	echo form_open(base_url() . 'login/validate_credentials','name="loginForm"');    	
    ?>    
<?if(!$miniform):?>   
<div class="category_title">
    <h2>
        <a href="/">&nbsp;Home</a>   
        &raquo; <label class="normal">Login</label> 
    </h2>
</div>
<br />
<?endif?>
    <table width="100%" class="login" >
    	<tbody>
    		<?if(!$miniform):?>
    		<tr>
				<td class="heading">&nbsp;Login to your account</td>
			</tr>
			<?endif?>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>
				
				<table class="pageContent">
				<tbody>
				<tr>
					<td>&nbsp;</td>
					<td class="errorText" align="left"><div id="<?=$prefix?>errorDiv"></div></td>
				</tr>
				<tr>
					<td class="req"><span class="colortext">*</span>Email:</td>
					<td><?php echo form_input($prefix. 'email', "",$emailjs);
                		$CI =& get_instance(); 
                		?>
                		 <input name="url" id="url" type="hidden" value="<?=$CI->uri->uri_string()?>"  />
                	</td>
				</tr>
				<tr>
					<td class="req"><span class="colortext">*</span>Password:</td>
					<td><?php echo form_password($prefix. 'password', '',$passwordjs); ?></td>
				</tr>
				<tr>
					<td colspan="2" class="spacer">&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td class="buttonRow">
						<a class="button" id="btnHomeLogin"  href="javascript:submitLogin('<?=$prefix?>')"><span>Log In</span></a> &nbsp; 
					</td>
				</tr>
				
				<tr>
					<td>&nbsp;</td>
					<td >
						<p>
                        <a class="actionlink" href="javascript:showBuyerSignup(<?= $miniform ? "1" : ""?>)" target="_self"><span>Not a member yet?</span></a>
                        </p>
                        <p>
						<a class="actionlink" href="javascript:showForgotYourPassword()" target="_self">Forgot your password?</a>
                        </p>
					</td>
				</tr>
				
			</tbody></table>
			
				</td>
			</tr>
    	</tbody>    	
    </table>       
   
    
    
	<?php
	echo form_close();
	?>

</div><!-- end login_form-->
    <?}?>
	 